package cn.wolfcode.wolf2w.controller;


import cn.wolfcode.wolf2w.JsonResult.JsonResult;
import cn.wolfcode.wolf2w.domain.Spot;
import cn.wolfcode.wolf2w.domain.Strategy;
import cn.wolfcode.wolf2w.domain.StrategyTheme;
import cn.wolfcode.wolf2w.query.SpotQuery;
import cn.wolfcode.wolf2w.query.StrategyQuery;
import cn.wolfcode.wolf2w.service.ISpotService;
import cn.wolfcode.wolf2w.service.IStrategyService;
import cn.wolfcode.wolf2w.service.IStrategyThemeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("spot")
public class SpotController {
    @Autowired
    private ISpotService spotService;



    @GetMapping("/query")
    public Object query(SpotQuery qo){
        return JsonResult.success(spotService.query(qo));
    }


    @GetMapping("/detail")
    public Object detail(String id){
        Spot spot = spotService.get(id);
        return JsonResult.success(spot);
    }

}
